var path = require('path');
var agefFiles = require('./agef/js_config.js').files;

var baseFiles = [
    "thr/jqueryUI/jquery-ui.js",
    "thr/jqueryUI/jquery.layout.js",
    "thr/Spectrum/spectrum.js"
];
baseFiles.prefix = '';

var adf = [
    "adf.js"
];
adf.prefix = '';

function generate(array) {
    var result = [];
    array.forEach(function(files) {
        var r = [];
        if (files.prefix) {
            files.forEach(function(file) {
                r.push(path.join(files.prefix, file));
            });
        } else {
            r = files;
        }
        result = result.concat(r);
    });
    return result;
}

exports.files = agefFiles.concat(generate([baseFiles, adf]));
// transformed_baseFiles.concat(transformed_drawd2dFiles).concat(transformed_gefFiles);